<%@ page language="java" import="java.util.*,student.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'check3.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<style>
	 td{border:1px solid red}
	
	</style>

  </head>
  
  <body>

  

    This is my JSP page. <br>
    <%
     Student s1=new Student();
     s1 = (Student) session.getAttribute("login");
     int id=s1.getStuno();
     StudentDao dao = new MySqlStudentDaoImpl();
     List<examresult> exam=new ArrayList<examresult>();
     exam=dao.getScore(id);
     %>
     <table style="border:1px solid red">
     <tr><td>考试日期</td><td>分数</td> <td>学号</td> <td>科目</td></tr>
     <%
     for(examresult score:exam){
     %>
     <tr><td><%=score.getExam_date() %></td><td><%=score.getScore() %></td> <td><%=score.getSt_id() %></td> <td><%=score.getSbname() %></td></tr>
     
     <%
     
     }
      %>

     </table>
     
     <%@include file="footer.jsp"%>
  </body>
</html>
